﻿using Architecture.Domain.Service;
using Architeture.Domain;
using MediatR;
using RBAC.ZhuBoLin.Application.Command.RoleCommand;

namespace RBAC.ZhuBoLin.Application.CommandHandlers.RoleHandler
{
    public class PicSelectCommandHandler : IRequestHandler<PicSelectCommand, List<AllPic>>
    {
        protected readonly IAllPicService allPicService;

        public PicSelectCommandHandler(IAllPicService allPicService)
        {
            this.allPicService = allPicService;
        }

        public async Task<List<AllPic>> Handle(PicSelectCommand request, CancellationToken cancellationToken)
        {
            return await allPicService.GetProductinspectionreport(request.name, request.gid);
        }
    }
}
